<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看发票详情</title>
    <meta name="renderer" content="webkit">
    <link rel="stylesheet" href="../../layuiadmin/js/finance/js/bootstrap/css/bootstrap.min.css" />
    <script type="text/javascript" src="../../layuiadmin/js/finance/js/jquery.min.js" ></script>
    <script type="text/javascript" src="../../layuiadmin/js/finance/js/bootstrap/js/bootstrap.js" ></script>
    <script type="text/javascript" src="../../layuiadmin/js/finance/js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../layuiadmin/js/finance/js/jquery.jqprint-0.3.js"></script>
    <script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js";></script>
    <script type="text/javascript" src="../../layuiadmin/js/finance/js/jquery.table2excel.js"></script>
    <script>
        $(document).ready(function () {
            var GRP=getlist();
            var invoiceId=GRP['invoiceId'];
            $.post("http://localhost:8080/financeInvoiceController/getById",{"invoiceId":invoiceId},function (msg) {
                var caseId=$("#caseId").text(msg.caseId.caseId);var invoiceTitle=$("#invoiceTitle").text(msg.invoiceTitle);
                var invoiceMoney=$("#invoiceMoney").text(msg.invoiceMoney);var invoiceDate=$("#invoiceDate").text(msg.invoiceDate);
                var invoiceNumber=$("#invoiceNumber").text(msg.invoiceNumber);var invoiceTypeId=$("#invoiceTypeId").text(msg.invoiceTypeId.invoiceType);
                var openTypeId=$("#openTypeId").text(msg.openTypeId.openType);var projectId=$("#projectId").text(msg.projectId.project);
                var taxPayerIdemtity=$("#taxPayerIdemtity").text(msg.taxPayerIdemtity);var basicBank=$("#basicBank").text(msg.basicBank);
                var registerdAddress=$("#registerdAddress").text(msg.registerdAddress);var fixedlineTelephone=$("#fixedlineTelephone").text(msg.fixedlineTelephone);
                var accountNumber=$("#accountNumber").text(msg.accountNumber);var invoiceRemark=$("#invoiceRemark").text(msg.invoiceRemark);
            });
        });
        function getlist() {
            var url = location.search; //获取url中"?"符后的字串
            var theRequest = new Object();
            if (url.indexOf("?") != -1) {
                var str = url.substr(1);
                var strs = str.split("&"); //将所有参数拆分放入数组
                for (var i = 0; i < strs.length; i++) {  //遍历参数数组
                    theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
                }
            }
            return theRequest;
        }
        //导出
        function out() {
            $("#alls").table2excel({
                //table2excel插件的可用配置参数有：
                exclude: ".noExl",//   exclude：不被导出的表格行的CSS class类。
                name: "Excel Document Name",//   name：导出的Excel文档的名称
                filename: "myFileName",//   filename：Excel文件的名称。
                exclude_img: true,//   exclude_img：是否导出图片。
                exclude_links: true,//   exclude_links：是否导出超链接
                exclude_inputs: true//    exclude_inputs：是否导出输入框中的内容
            });
        }
        //打印
        function print() {
            $("#alls").jqprint();
        }

    </script>
</head>
<body>
<div class="container-fluid" id="alls">
    <form class="form-horizontal form-inline" >
        <div class="row" style="margin-top: 15px">
            <div class="col-lg-12">
                <div class="col-lg-1"></div>
                <div class="col-lg-11">
                    <font style="font-size: 20px"><strong>|发票详情</strong></font><br>
                </div>
            </div>
            <div class="col-lg-12">
                <br>
                <div class="col-lg-1"></div>
                <div class="col-lg-5">
                    <label>案号：</label>
                    <span id="caseId"></span>
                </div>
                <div class="col-lg-6">
                    <label>发票抬头：</label>
                    <span id="invoiceTitle"></span>
                </div>
            </div>
            <div class="col-lg-12">
                <br>
                <div class="col-lg-1"></div>
                <div class="col-lg-5">
                    <label>发票金额：</label>
                    <span id="invoiceMoney"></span>
                </div>
                <div class="col-lg-6">
                    <label>开票日期：</label>
                    <span id="invoiceDate"></span>
                </div>
            </div>
            <div class="col-lg-12">
                <br>
                <div class="col-lg-1"></div>
                <div class="col-lg-5">
                    <label>发票号：</label>
                    <span id="invoiceNumber"></span>
                </div>
                <div class="col-lg-6">
                    <label>开具发票类型：</label>
                    <span id="invoiceTypeId"></span>
                </div>
            </div>
            <div class="col-lg-12">
                <br>
                <div class="col-lg-1"></div>
                <div class="col-lg-5">
                    <label>开具类型：</label>
                    <span id="openTypeId"></span>
                </div>
                <div class="col-lg-6">
                    <label>开具项目：</label>
                    <span id="projectId"></span>
                </div>
            </div>
            <div class="col-lg-12">
                <br>
                <div class="col-lg-1"></div>
                <div class="col-lg-5">
                    <label>纳税人识别号：</label>
                    <span id="taxPayerIdemtity"></span>
                </div>
                <div class="col-lg-6">
                    <label>基本开户银行：</label>
                    <span id="basicBank"></span>
                </div>
            </div>
            <div class="col-lg-12">
                <br>
                <div class="col-lg-1"></div>
                <div class="col-lg-5">
                    <label>注册地址：</label>
                    <span id="registerdAddress"></span>
                </div>
                <div class="col-lg-6">
                    <label>固定电话：</label>
                    <span id="fixedlineTelephone"></span>
                </div>
            </div>
            <div class="col-lg-12">
                <br>
                <div class="col-lg-1"></div>
                <div class="col-lg-5">
                    <label>基本开户账号：</label>
                    <span id="accountNumber"></span>
                </div>
                <div class="col-lg-6">
                    <label>开票备注：</label>
                    <span id="invoiceRemark"></span>
                </div>
            </div>
            <div class="col-lg-12">
                <br>
                <div class="col-lg-1"></div>
                <div class="col-lg-11">
                    <button type="button" class="btn btn-success" onclick="out()">导出</button>
                    <button type="button" class="btn btn-success" onclick="print()">打印</button>
                </div>
            </div>
        </div>
    </form>
</div>
</body>
</html>